/*
 * ConfigBrowseTableModel.java
 *
 * Created on 22. listopad 2006, 12:03
 *
 */

package cz.results.winter6.view.browse.table;

import java.util.ArrayList;
import java.util.Iterator;

public class ConfigBrowseTableModel extends ArrayList<ConfigColumn>{
    
    
    public ConfigBrowseTableModel(){
    }
    
    public int getPocetSloupcu(){
        return size();
    }
    
    
    /** metoda vraci true jestlize se v listu vyskytuje polozka  s nazvem */
    public boolean isNazevIn(String nazev){
        Iterator iterator = this.iterator();
        
        while(iterator.hasNext()){
            ConfigColumn configColumn = (ConfigColumn)iterator.next();
            if(configColumn.getNazev().equals(nazev)) return true;
        }
        
        return false;
    }
    
}
